{include file='_header'}
<div class="page-header">
    当前位置：<span class="text-primary"> 处理商户入驻申请 </span> <small>({$item['merchname']})</small>
</div>

<div class="page-content">
<form id="setform" action="" method="post" class="form-horizontal form-validate">
<input type="hidden" name="id" value="{$item['id']}"/>
<div class="form-group">
    <label class="col-lg control-label">昵称</label>
    <div class="col-sm-8">
        <div class="form-control-static"><a target="_blank" href="{:url('admin/member/detail',array('id'=>$member['id']))}"> {$member['nickname']}</a></div>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label">账户名</label>
    <div class="col-sm-8">
        <div class="form-control-static">{$item['uname']}</div>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label must">商户名称</label>
    <div class="col-sm-8">
        <input type="text" class="form-control" name="merchname" value="{$item['merchname']}" data-rule-required="true"/>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label must">主营项目</label>
    <div class="col-sm-8">
        <input type="text" class="form-control" name="salecate" value="{$item['salecate']}" data-rule-required="true"/>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label must">联系人</label>
    <div class="col-sm-8">
        <input type="text" class="form-control" name="realname" value="{$item['realname']}" data-rule-required="true"/>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label must">联系电话</label>
    <div class="col-sm-8">
        <input type="tel" class="form-control" name="mobile" value="{$item['mobile']}" data-rule-required="true"/>
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label">商户简介</label>
    <div class="col-sm-8">
        <textarea name="desc" class="form-control textarea">{$item['desc']}</textarea>
    </div>
</div>
<div class="form-group-title">申请操作</div>
<div class="form-group">
    <label class="col-lg control-label">申请状态</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name="status" value="0" {if $item['status']==0}checked{/if} onclick='showReason(false)'/>
            申请中
        </label>
        <label class="radio-inline">
            <input type="radio" name="status" value="-1" {if $item['status']==-1}checked{/if}
            onclick='showReason(true)'/> 驳回申请
        </label>
        <label class="radio-inline">
            <input type="radio" name="status" value="1" {if $item['status']==1}checked{/if} onclick='showReason(false)'/>
            允许入驻
        </label>
    </div>
</div>

<div class="form-group" id="reason" {if $item['status']!=-1}style='display:none'{/if}>
<label class="col-lg control-label">驳回理由</label>
<div class="col-sm-8">
    <textarea name="reason" class="form-control textarea">{$item['reason']}</textarea>
</div>
</div>

<div class="form-group">
    <label class="col-lg control-label"></label>
    <div class="col-sm-9 col-xs-12">
        <input type="submit" value="提交" class="btn btn-primary"/>
        <a class="btn btn-default" href="{:url('admin/merch/reg')}">返回列表</a>
    </div>
</div>

</form>
</div>
<script>
    function showReason(show) {
        if (show) {
            $('#reason').show();
        } else {
            $('#reason').hide();
        }
    }
</script>

{include file='_footer'}